home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000021_bounce-amos-li…net@onelist.com_Tue Sep 1 20:21:51 1998.msg < prev    next >
Text File  |  1998-10-01  |  5KB  |  133 lines

  1. >From bounce-amos-list--879-mcox=access.digex.net@onelist.com  Tue Sep  1 20:21:51 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.135.229])
  3.     by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id UAA29822
  4.     for <mcox@access.digex.net>; Tue, 1 Sep 1998 20:21:51 -0400 (EDT)
  5. Received: (qmail 16350 invoked by alias); 2 Sep 1998 00:19:51 -0000
  6. Received: (qmail 16341 invoked from network); 2 Sep 1998 00:19:49 -0000
  7. Received: from unknown (HELO mail.enterprise.net) (194.72.192.18) by pop.onelist.com with SMTP; 2 Sep 1998 00:19:49 -0000
  8. Received: from enterprise.net (root@ppp-168.telinco.com [195.188.107.168]) by mail.enterprise.net (8.8.5/8.8.5) with SMTP id BAA20720 for <amos-list@onelist.com>; Wed, 2 Sep 1998 01:21:45 +0100 (GMT/BST)
  9. From: Andrew Crowe <andrewcrowe@enterprise.net>
  10. To: amos-list@onelist.com
  11. Date: Wed, 02 Sep 1998 01:14:42 +0000
  12. Message-ID: <yam7549.2126.1197282024@mail.enterprise.net>
  13. In-Reply-To: <002101bdd5f8$c052cee0$99ecabc3@np5gt>
  14. X-Mailer: YAM 2.0 Preview5 - Amiga Mailer by Marcel Beck - http://www.yam.ch
  15. Organization: Manta Soft
  16. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  17. Delivered-To: mailing list amos-list@onelist.com
  18. Precedence: bulk
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-Type: text/plain
  22. Subject: [amos-list] Re: Hey! Ne1 Like Joysticks?
  23. Status: O
  24. X-Status: 
  25.  
  26. From: Andrew Crowe <andrewcrowe@enterprise.net>
  27.  
  28. Hi Everybody,
  29.  
  30. > Hey! Look! At this Ne1 want a piece of code that turns the joystick
  31. input 2 + or -..
  32.  
  33. Hmm, this seemed a bit too complicated, so I decided to check it out
  34. (and I managed to kill 5mins at the same time ;)
  35.  
  36. I built a timing loop to test the 2 versions :
  37.  
  38. 'different way
  39. Timer=0
  40. For A=0 To 100000
  41.    J=Joy(1)
  42.    K=J-2
  43.    P#=J/4.0
  44.    P=P#
  45.    I=Sgn(J)
  46.    If P#=P
  47.       X=Sgn(J-6)*I
  48.    End If 
  49.    If P=0
  50.       Y=I*(K+K+1)
  51.    End If 
  52. Next 
  53. Print Timer
  54.  
  55.  
  56. ' Old way
  57. Timer=0
  58. For A=0 To 100000
  59.    X=0 : Y=0
  60.    If Jup(1)
  61.       Y=-1
  62.    End If 
  63.    If Jdown(1)
  64.       Y=1
  65.    End If 
  66.    If Jleft(1)
  67.       X=-1
  68.    End If 
  69.    If Jright(1)
  70.       X=1
  71.    End If 
  72. Next 
  73. Print Timer
  74.  
  75. before compiling the Old way was a lot faster, but after compiling it
  76. was a lot closer:
  77.  
  78. no joystick movement
  79.  
  80. Old:155 
  81. New:143
  82.  
  83. Holding down on joystick
  84. Old:154
  85. New:193
  86.  
  87. Although new is quicker when there's no joy activ. it slows down when
  88. the joystick is pressed.
  89.  
  90. But, 50vbl out of 100000 loops isn't going to make a lot of difference
  91. anyway so you may as well just use whichever you prefer.
  92.  
  93.  
  94. -- 
  95.                                 <PRE>
  96.   - --------------------- Quote of the day: ---------------------- -
  97. It is better to have tried and failed than to have failed to try, but
  98. the result's the same.
  99. -- Mike Dennison
  100.  
  101. +--------------------------------------------------------------------+
  102. |                                                ,aNNN               |
  103. |  a&   NL                 ,a,                 ,gNNNNN               |
  104. |  @7L d 0   ,a,,aw ,a,,  JN Q,  ,a,,aw,,,,  ,gNM"`NN'               |
  105. | J  9w"  K N" "" NN"""""WF  ~3&N" "" N   ""^N"    NF                |
  106. | N , " , Nd ,@M, NN JML @ML d@N ,@4, N       ',  JK                 |
  107. |d JMc dN  N  NN  NN 0 1 1J1 0 0  NN  N         L,K                  |
  108. |N,N 0w' Na@h,,a,,NQ,0 &J1J&,0  \,,a,,N         JF                   |
  109. | ""  "  ~"  ""~"""~"" ""  """  t""~"""        j"1                   |
  110. |                               F             JgmJ        ,gm        |
  111. |                               F            N"  N  ,,    F ,N gNN   |
  112. |      Andrew Crowe             Q          jJF  mP p""9w,NL NwmP 0mw |
  113. |      ~~~~~~~~~~~~             ]         / I  0 F@ am, Nw  ,0&   ,N |
  114. |       Manta Soft             ,F\      a' ,N  Nf L E 0 0ML N""N 0"  |
  115. |       ~~~~~~~~~~            ,N  \,  ,P N@"  JF  & `@" NJL N  N 0   |
  116. |                            ,N     ad"   \wam"   `Nx,aN JNmN  NmN   |
  117. |                            NN ,,gN" ""PP"                          |
  118. |                           dNNNNN"                                  |
  119. |                           NNN@"      Web Designing and          // |
  120. | Visit our Web Site:       ""               Amiga Programming \\//  |
  121. |                                                                    |
  122. |     HTTP://www.geocities.com/Eureka/Gold/1713/                     |
  123. |                                                                    |
  124. +----------------------------+      This signature was created using |
  125. | andrewcrowe@enterprise.net |         AsciiArt Studio               |
  126. +----------------------------+---------------------------------------+
  127.                                 </PRE>
  128.  
  129.  
  130. ------------------------------------------------------------------------
  131. Help support ONElist, while generating interest in your product or
  132. service. ONElist has a variety of advertising packages. Visit
  133. http://www.onelist.com/advert.html for more information.